clear; clc; close all;

% 参数设置
a = 1;
q = 1; % 整数阶
b = 1; P = -2; Q = 2;
N_total = 3000;

% 初始值列表和对应颜色
init_vals = [
    0.1, 0.1;
   -5.0, 0.5;
    0.1, 0.5;
   -1.0, 0.5
];
colors = {'g', 'b', 'r', 'y'};

figure; hold on;

for idx = 1:size(init_vals,1)
    x0 = init_vals(idx, 1);
    y0 = init_vals(idx, 2);
    
    [x, y] = SCLMM(1, a, b, P, Q, x0, y0, N_total);
    
    % 丢弃暂态，取后半部分绘图
    x_plot = x(round(N_total/2):end);
    y_plot = y(round(N_total/2):end);
    
    scatter(x_plot, y_plot, 1, colors{idx}, 'filled');
    
end

xlabel('x(n)', 'FontSize', 14);
ylabel('y(n)', 'FontSize', 14);
title('Fig.11(a) 2D-SCLMM 多吸引子', 'FontSize', 16);
axis equal;
grid on;
box on;
